<!DOCTYPE html>
<html lang="en-US">
  
<!-- Mirrored from heavy_code_industry.gitee.io/code_heavy_industry/pro001-javaweb/note/note002-JavaScript.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 10 May 2022 05:03:18 GMT -->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>代码重工</title>
    <meta name="generator" content="VuePress 1.9.5">
    
    <meta name="description" content="代码重工">
    
    <link rel="preload" href="../../assets/css/0.styles.f7de6701.css" as="style"><link rel="preload" href="../../assets/js/app.972bd0f0.js" as="script"><link rel="preload" href="../../assets/js/4.904e76b5.js" as="script"><link rel="preload" href="../../assets/js/123.781e7192.js" as="script"><link rel="prefetch" href="../../assets/js/1.d66e04b2.js"><link rel="prefetch" href="../../assets/js/10.7093d550.js"><link rel="prefetch" href="../../assets/js/100.384331b2.js"><link rel="prefetch" href="../../assets/js/101.582f78e7.js"><link rel="prefetch" href="../../assets/js/102.17f2c0ec.js"><link rel="prefetch" href="../../assets/js/103.a530857d.js"><link rel="prefetch" href="../../assets/js/104.62821ce1.js"><link rel="prefetch" href="../../assets/js/105.11cdcc82.js"><link rel="prefetch" href="../../assets/js/106.d57c1e75.js"><link rel="prefetch" href="../../assets/js/107.7ebeb306.js"><link rel="prefetch" href="../../assets/js/108.c067b47b.js"><link rel="prefetch" href="../../assets/js/109.9495d2ca.js"><link rel="prefetch" href="../../assets/js/11.acc2935e.js"><link rel="prefetch" href="../../assets/js/110.7f58dbd3.js"><link rel="prefetch" href="../../assets/js/111.f78239ff.js"><link rel="prefetch" href="../../assets/js/112.8eb72445.js"><link rel="prefetch" href="../../assets/js/113.3f5aff71.js"><link rel="prefetch" href="../../assets/js/114.9f65cf57.js"><link rel="prefetch" href="../../assets/js/115.dcaea004.js"><link rel="prefetch" href="../../assets/js/116.726c5aac.js"><link rel="prefetch" href="../../assets/js/117.54d6c26a.js"><link rel="prefetch" href="../../assets/js/118.3f4e0bda.js"><link rel="prefetch" href="../../assets/js/119.95ed5dc6.js"><link rel="prefetch" href="../../assets/js/12.a5354f50.js"><link rel="prefetch" href="../../assets/js/120.4fd08fac.js"><link rel="prefetch" href="../../assets/js/121.f4aadbe5.js"><link rel="prefetch" href="../../assets/js/122.d588a1e0.js"><link rel="prefetch" href="../../assets/js/124.ed312291.js"><link rel="prefetch" href="../../assets/js/125.bceffbb9.js"><link rel="prefetch" href="../../assets/js/126.51bf552f.js"><link rel="prefetch" href="../../assets/js/127.4800687b.js"><link rel="prefetch" href="../../assets/js/128.fcdd6f2a.js"><link rel="prefetch" href="../../assets/js/129.2a25d78a.js"><link rel="prefetch" href="../../assets/js/13.88a0c565.js"><link rel="prefetch" href="../../assets/js/130.dcfe7623.js"><link rel="prefetch" href="../../assets/js/131.c29e7c45.js"><link rel="prefetch" href="../../assets/js/132.9a412a4b.js"><link rel="prefetch" href="../../assets/js/133.615218d5.js"><link rel="prefetch" href="../../assets/js/134.2168ca5a.js"><link rel="prefetch" href="../../assets/js/135.a5e262ff.js"><link rel="prefetch" href="../../assets/js/136.7dba5235.js"><link rel="prefetch" href="../../assets/js/137.445576e7.js"><link rel="prefetch" href="../../assets/js/138.577b3f66.js"><link rel="prefetch" href="../../assets/js/139.b646f1ac.js"><link rel="prefetch" href="../../assets/js/14.36391765.js"><link rel="prefetch" href="../../assets/js/140.52abf81e.js"><link rel="prefetch" href="../../assets/js/141.807c626b.js"><link rel="prefetch" href="../../assets/js/142.adf9e127.js"><link rel="prefetch" href="../../assets/js/143.9773d979.js"><link rel="prefetch" href="../../assets/js/144.5658ae76.js"><link rel="prefetch" href="../../assets/js/145.2d2fb13b.js"><link rel="prefetch" href="../../assets/js/146.0e322019.js"><link rel="prefetch" href="../../assets/js/147.50b34ac1.js"><link rel="prefetch" href="../../assets/js/148.463aab7c.js"><link rel="prefetch" href="../../assets/js/149.9bd7c539.js"><link rel="prefetch" href="../../assets/js/15.4a8e9d28.js"><link rel="prefetch" href="../../assets/js/150.9449ca28.js"><link rel="prefetch" href="../../assets/js/151.1961c6db.js"><link rel="prefetch" href="../../assets/js/152.18709656.js"><link rel="prefetch" href="../../assets/js/153.a4bf78f6.js"><link rel="prefetch" href="../../assets/js/154.6c90b1d5.js"><link rel="prefetch" href="../../assets/js/155.024247e2.js"><link rel="prefetch" href="../../assets/js/156.76281b57.js"><link rel="prefetch" href="../../assets/js/157.a7c02212.js"><link rel="prefetch" href="../../assets/js/158.0d00acef.js"><link rel="prefetch" href="../../assets/js/159.9180c937.js"><link rel="prefetch" href="../../assets/js/16.87793b5d.js"><link rel="prefetch" href="../../assets/js/160.d7a98288.js"><link rel="prefetch" href="../../assets/js/161.389ddf84.js"><link rel="prefetch" href="../../assets/js/162.ab22d7dc.js"><link rel="prefetch" href="../../assets/js/163.087257c6.js"><link rel="prefetch" href="../../assets/js/164.addfc5af.js"><link rel="prefetch" href="../../assets/js/165.f90e6b2a.js"><link rel="prefetch" href="../../assets/js/166.fa06e4b6.js"><link rel="prefetch" href="../../assets/js/167.a00e722b.js"><link rel="prefetch" href="../../assets/js/168.e3855223.js"><link rel="prefetch" href="../../assets/js/169.e0c63a4e.js"><link rel="prefetch" href="../../assets/js/17.dec86310.js"><link rel="prefetch" href="../../assets/js/170.7c5835f4.js"><link rel="prefetch" href="../../assets/js/171.7d9ae110.js"><link rel="prefetch" href="../../assets/js/172.4da5caea.js"><link rel="prefetch" href="../../assets/js/173.f8ac6155.js"><link rel="prefetch" href="../../assets/js/174.3b831765.js"><link rel="prefetch" href="../../assets/js/175.01782f3d.js"><link rel="prefetch" href="../../assets/js/176.6eab6644.js"><link rel="prefetch" href="../../assets/js/177.86339767.js"><link rel="prefetch" href="../../assets/js/178.c437c804.js"><link rel="prefetch" href="../../assets/js/179.927227c9.js"><link rel="prefetch" href="../../assets/js/18.9167733d.js"><link rel="prefetch" href="../../assets/js/180.caa2c660.js"><link rel="prefetch" href="../../assets/js/181.c186b8ac.js"><link rel="prefetch" href="../../assets/js/182.0475844f.js"><link rel="prefetch" href="../../assets/js/183.2c5950c8.js"><link rel="prefetch" href="../../assets/js/184.82b336f6.js"><link rel="prefetch" href="../../assets/js/185.e2d4a46e.js"><link rel="prefetch" href="../../assets/js/186.99a3de8a.js"><link rel="prefetch" href="../../assets/js/187.d557500c.js"><link rel="prefetch" href="../../assets/js/188.e81bd251.js"><link rel="prefetch" href="../../assets/js/189.d07d368a.js"><link rel="prefetch" href="../../assets/js/19.017b4ad0.js"><link rel="prefetch" href="../../assets/js/190.173606ea.js"><link rel="prefetch" href="../../assets/js/191.c5ac0c71.js"><link rel="prefetch" href="../../assets/js/192.127d6d93.js"><link rel="prefetch" href="../../assets/js/193.2f9011c9.js"><link rel="prefetch" href="../../assets/js/194.14f534a3.js"><link rel="prefetch" href="../../assets/js/195.65939036.js"><link rel="prefetch" href="../../assets/js/196.6e3cf025.js"><link rel="prefetch" href="../../assets/js/197.4d18b1d7.js"><link rel="prefetch" href="../../assets/js/198.c2e521c3.js"><link rel="prefetch" href="../../assets/js/199.d72c63dd.js"><link rel="prefetch" href="../../assets/js/20.6aa686d0.js"><link rel="prefetch" href="../../assets/js/200.56d7dbd3.js"><link rel="prefetch" href="../../assets/js/201.c72a395d.js"><link rel="prefetch" href="../../assets/js/202.cb32f7af.js"><link rel="prefetch" href="../../assets/js/203.285e6b92.js"><link rel="prefetch" href="../../assets/js/204.ead50027.js"><link rel="prefetch" href="../../assets/js/205.190c1baf.js"><link rel="prefetch" href="../../assets/js/206.4dab4ba0.js"><link rel="prefetch" href="../../assets/js/207.f11eee48.js"><link rel="prefetch" href="../../assets/js/208.e2f8ca82.js"><link rel="prefetch" href="../../assets/js/209.e7e74aff.js"><link rel="prefetch" href="../../assets/js/21.f7d66fe8.js"><link rel="prefetch" href="../../assets/js/210.69c4a0ed.js"><link rel="prefetch" href="../../assets/js/211.a1ab5062.js"><link rel="prefetch" href="../../assets/js/212.6d0473bd.js"><link rel="prefetch" href="../../assets/js/213.bd120419.js"><link rel="prefetch" href="../../assets/js/214.c7d4362c.js"><link rel="prefetch" href="../../assets/js/215.8adc34dc.js"><link rel="prefetch" href="../../assets/js/216.abf8ff23.js"><link rel="prefetch" href="../../assets/js/217.10f9fc46.js"><link rel="prefetch" href="../../assets/js/218.52e31fec.js"><link rel="prefetch" href="../../assets/js/219.ea0551af.js"><link rel="prefetch" href="../../assets/js/22.b1de9b18.js"><link rel="prefetch" href="../../assets/js/220.6be520c8.js"><link rel="prefetch" href="../../assets/js/221.c0d93576.js"><link rel="prefetch" href="../../assets/js/222.1bb0eaff.js"><link rel="prefetch" href="../../assets/js/223.8492b065.js"><link rel="prefetch" href="../../assets/js/224.5897434e.js"><link rel="prefetch" href="../../assets/js/225.51902428.js"><link rel="prefetch" href="../../assets/js/226.9da70eee.js"><link rel="prefetch" href="../../assets/js/227.9e113839.js"><link rel="prefetch" href="../../assets/js/228.d689b27d.js"><link rel="prefetch" href="../../assets/js/229.28f74090.js"><link rel="prefetch" href="../../assets/js/23.e3b58d3d.js"><link rel="prefetch" href="../../assets/js/230.465a35a0.js"><link rel="prefetch" href="../../assets/js/231.219aeb63.js"><link rel="prefetch" href="../../assets/js/232.84035c50.js"><link rel="prefetch" href="../../assets/js/233.ef27424d.js"><link rel="prefetch" href="../../assets/js/234.5dcf1349.js"><link rel="prefetch" href="../../assets/js/235.bcc0c537.js"><link rel="prefetch" href="../../assets/js/236.9bb64465.js"><link rel="prefetch" href="../../assets/js/237.f3300514.js"><link rel="prefetch" href="../../assets/js/238.ca7af9ac.js"><link rel="prefetch" href="../../assets/js/239.fdfe2127.js"><link rel="prefetch" href="../../assets/js/24.2e010582.js"><link rel="prefetch" href="../../assets/js/240.8a4488af.js"><link rel="prefetch" href="../../assets/js/241.9987dfab.js"><link rel="prefetch" href="../../assets/js/242.819ed984.js"><link rel="prefetch" href="../../assets/js/243.bf129ecd.js"><link rel="prefetch" href="../../assets/js/244.030b4b49.js"><link rel="prefetch" href="../../assets/js/245.7663f620.js"><link rel="prefetch" href="../../assets/js/246.ed2b2fc0.js"><link rel="prefetch" href="../../assets/js/247.54dd84f1.js"><link rel="prefetch" href="../../assets/js/248.a1c69038.js"><link rel="prefetch" href="../../assets/js/249.47dd7b3b.js"><link rel="prefetch" href="../../assets/js/25.a5f2f737.js"><link rel="prefetch" href="../../assets/js/250.ec8017a5.js"><link rel="prefetch" href="../../assets/js/251.89ab0cf7.js"><link rel="prefetch" href="../../assets/js/252.5ec1eea4.js"><link rel="prefetch" href="../../assets/js/253.31a37280.js"><link rel="prefetch" href="../../assets/js/254.fcfabb55.js"><link rel="prefetch" href="../../assets/js/255.286f4c17.js"><link rel="prefetch" href="../../assets/js/256.ce77595b.js"><link rel="prefetch" href="../../assets/js/257.cb3677c0.js"><link rel="prefetch" href="../../assets/js/258.ca18e0e9.js"><link rel="prefetch" href="../../assets/js/259.65dc8492.js"><link rel="prefetch" href="../../assets/js/26.cce346fc.js"><link rel="prefetch" href="../../assets/js/260.475ddaba.js"><link rel="prefetch" href="../../assets/js/261.643b784a.js"><link rel="prefetch" href="../../assets/js/262.e5092c67.js"><link rel="prefetch" href="../../assets/js/263.5e85d32e.js"><link rel="prefetch" href="../../assets/js/264.6ff4b789.js"><link rel="prefetch" href="../../assets/js/265.fee7416a.js"><link rel="prefetch" href="../../assets/js/266.8d8a5e44.js"><link rel="prefetch" href="../../assets/js/267.8c62a655.js"><link rel="prefetch" href="../../assets/js/268.762073ff.js"><link rel="prefetch" href="../../assets/js/269.ffe69921.js"><link rel="prefetch" href="../../assets/js/27.22790cda.js"><link rel="prefetch" href="../../assets/js/270.d5bf783f.js"><link rel="prefetch" href="../../assets/js/271.83fd2f70.js"><link rel="prefetch" href="../../assets/js/272.6de67fa9.js"><link rel="prefetch" href="../../assets/js/273.628e1b77.js"><link rel="prefetch" href="../../assets/js/274.7f0d82c6.js"><link rel="prefetch" href="../../assets/js/275.d4478098.js"><link rel="prefetch" href="../../assets/js/276.56649e5b.js"><link rel="prefetch" href="../../assets/js/277.05b881f2.js"><link rel="prefetch" href="../../assets/js/278.c079de28.js"><link rel="prefetch" href="../../assets/js/279.58101972.js"><link rel="prefetch" href="../../assets/js/28.ac0ba3fa.js"><link rel="prefetch" href="../../assets/js/280.5e32c770.js"><link rel="prefetch" href="../../assets/js/281.59fb6cf4.js"><link rel="prefetch" href="../../assets/js/282.f22da512.js"><link rel="prefetch" href="../../assets/js/283.db103d63.js"><link rel="prefetch" href="../../assets/js/284.a373c7e0.js"><link rel="prefetch" href="../../assets/js/285.55c6f720.js"><link rel="prefetch" href="../../assets/js/286.f924c38c.js"><link rel="prefetch" href="../../assets/js/287.52a35525.js"><link rel="prefetch" href="../../assets/js/288.dcc32270.js"><link rel="prefetch" href="../../assets/js/289.835ad2b5.js"><link rel="prefetch" href="../../assets/js/29.6e1dc238.js"><link rel="prefetch" href="../../assets/js/290.749e38a9.js"><link rel="prefetch" href="../../assets/js/291.90916822.js"><link rel="prefetch" href="../../assets/js/292.b453b275.js"><link rel="prefetch" href="../../assets/js/293.11ad0754.js"><link rel="prefetch" href="../../assets/js/294.dddc45b9.js"><link rel="prefetch" href="../../assets/js/295.74ecca38.js"><link rel="prefetch" href="../../assets/js/296.2061efa6.js"><link rel="prefetch" href="../../assets/js/297.b838fcd5.js"><link rel="prefetch" href="../../assets/js/298.8c08be1f.js"><link rel="prefetch" href="../../assets/js/299.5a99490b.js"><link rel="prefetch" href="../../assets/js/3.9ca9fb75.js"><link rel="prefetch" href="../../assets/js/30.64f9cad0.js"><link rel="prefetch" href="../../assets/js/300.a5010762.js"><link rel="prefetch" href="../../assets/js/301.a2f8795a.js"><link rel="prefetch" href="../../assets/js/302.129bdff3.js"><link rel="prefetch" href="../../assets/js/303.57268b2c.js"><link rel="prefetch" href="../../assets/js/304.5556b94f.js"><link rel="prefetch" href="../../assets/js/305.72bbf9b8.js"><link rel="prefetch" href="../../assets/js/306.821163a7.js"><link rel="prefetch" href="../../assets/js/307.b85ceac7.js"><link rel="prefetch" href="../../assets/js/308.7f794216.js"><link rel="prefetch" href="../../assets/js/309.212b7a1d.js"><link rel="prefetch" href="../../assets/js/31.386297cc.js"><link rel="prefetch" href="../../assets/js/310.089b4a08.js"><link rel="prefetch" href="../../assets/js/311.c7f6aabd.js"><link rel="prefetch" href="../../assets/js/312.810271c0.js"><link rel="prefetch" href="../../assets/js/313.030424f0.js"><link rel="prefetch" href="../../assets/js/314.a95451b6.js"><link rel="prefetch" href="../../assets/js/315.f883b88e.js"><link rel="prefetch" href="../../assets/js/316.676ed945.js"><link rel="prefetch" href="../../assets/js/317.0dcbeaef.js"><link rel="prefetch" href="../../assets/js/318.bd172af6.js"><link rel="prefetch" href="../../assets/js/319.e2d01ca1.js"><link rel="prefetch" href="../../assets/js/32.8927ba28.js"><link rel="prefetch" href="../../assets/js/320.09b01482.js"><link rel="prefetch" href="../../assets/js/321.3b70dce2.js"><link rel="prefetch" href="../../assets/js/322.5f7046ad.js"><link rel="prefetch" href="../../assets/js/323.ffd56783.js"><link rel="prefetch" href="../../assets/js/324.cfe0b188.js"><link rel="prefetch" href="../../assets/js/325.cc2f1112.js"><link rel="prefetch" href="../../assets/js/326.635a861b.js"><link rel="prefetch" href="../../assets/js/327.94eacc0e.js"><link rel="prefetch" href="../../assets/js/328.7d4790fb.js"><link rel="prefetch" href="../../assets/js/329.38f7ef56.js"><link rel="prefetch" href="../../assets/js/33.bd1f28e6.js"><link rel="prefetch" href="../../assets/js/330.269edfe2.js"><link rel="prefetch" href="../../assets/js/331.21623a36.js"><link rel="prefetch" href="../../assets/js/332.1f1c659c.js"><link rel="prefetch" href="../../assets/js/333.fe34384d.js"><link rel="prefetch" href="../../assets/js/334.34a514a7.js"><link rel="prefetch" href="../../assets/js/335.9272b0cc.js"><link rel="prefetch" href="../../assets/js/336.796dcaf9.js"><link rel="prefetch" href="../../assets/js/337.bfd29430.js"><link rel="prefetch" href="../../assets/js/338.fdb020fd.js"><link rel="prefetch" href="../../assets/js/339.d7f19890.js"><link rel="prefetch" href="../../assets/js/34.36a2460a.js"><link rel="prefetch" href="../../assets/js/340.b22b3f52.js"><link rel="prefetch" href="../../assets/js/341.47e1d3f4.js"><link rel="prefetch" href="../../assets/js/342.38ca17d1.js"><link rel="prefetch" href="../../assets/js/343.2e7874e5.js"><link rel="prefetch" href="../../assets/js/344.6697aea1.js"><link rel="prefetch" href="../../assets/js/345.ad3be23a.js"><link rel="prefetch" href="../../assets/js/346.d40fa749.js"><link rel="prefetch" href="../../assets/js/347.881934aa.js"><link rel="prefetch" href="../../assets/js/348.2e8d29b9.js"><link rel="prefetch" href="../../assets/js/349.87f51cb4.js"><link rel="prefetch" href="../../assets/js/35.80f36815.js"><link rel="prefetch" href="../../assets/js/350.06081b68.js"><link rel="prefetch" href="../../assets/js/351.f883c9ae.js"><link rel="prefetch" href="../../assets/js/352.8fcd0728.js"><link rel="prefetch" href="../../assets/js/353.2dd787b0.js"><link rel="prefetch" href="../../assets/js/354.689db664.js"><link rel="prefetch" href="../../assets/js/355.b9a083ea.js"><link rel="prefetch" href="../../assets/js/356.3eaa4bf3.js"><link rel="prefetch" href="../../assets/js/357.2f05ac11.js"><link rel="prefetch" href="../../assets/js/358.c6777610.js"><link rel="prefetch" href="../../assets/js/359.2ae0c8ac.js"><link rel="prefetch" href="../../assets/js/36.f9bba134.js"><link rel="prefetch" href="../../assets/js/360.c9811603.js"><link rel="prefetch" href="../../assets/js/361.5c3068d4.js"><link rel="prefetch" href="../../assets/js/362.a80ddcc6.js"><link rel="prefetch" href="../../assets/js/363.ccbb8d6e.js"><link rel="prefetch" href="../../assets/js/364.8da5de40.js"><link rel="prefetch" href="../../assets/js/365.0d9f6c8a.js"><link rel="prefetch" href="../../assets/js/366.e410e582.js"><link rel="prefetch" href="../../assets/js/367.f8689b17.js"><link rel="prefetch" href="../../assets/js/368.57119763.js"><link rel="prefetch" href="../../assets/js/369.f92c7aed.js"><link rel="prefetch" href="../../assets/js/37.8935c848.js"><link rel="prefetch" href="../../assets/js/370.8e896c3a.js"><link rel="prefetch" href="../../assets/js/371.e2565759.js"><link rel="prefetch" href="../../assets/js/372.0028b0ce.js"><link rel="prefetch" href="../../assets/js/373.82bfe997.js"><link rel="prefetch" href="../../assets/js/374.434f814f.js"><link rel="prefetch" href="../../assets/js/375.8478c681.js"><link rel="prefetch" href="../../assets/js/376.998ce2de.js"><link rel="prefetch" href="../../assets/js/377.670e9be5.js"><link rel="prefetch" href="../../assets/js/378.c9cfc01b.js"><link rel="prefetch" href="../../assets/js/379.0aacc719.js"><link rel="prefetch" href="../../assets/js/38.86fba1a7.js"><link rel="prefetch" href="../../assets/js/380.14a91411.js"><link rel="prefetch" href="../../assets/js/381.9e783c93.js"><link rel="prefetch" href="../../assets/js/382.cf2ffc03.js"><link rel="prefetch" href="../../assets/js/383.c32b0740.js"><link rel="prefetch" href="../../assets/js/384.4280025f.js"><link rel="prefetch" href="../../assets/js/385.a816d541.js"><link rel="prefetch" href="../../assets/js/386.1d8fc395.js"><link rel="prefetch" href="../../assets/js/387.bc22626f.js"><link rel="prefetch" href="../../assets/js/388.1cf59352.js"><link rel="prefetch" href="../../assets/js/389.a09795bf.js"><link rel="prefetch" href="../../assets/js/39.c8c0ff8e.js"><link rel="prefetch" href="../../assets/js/390.6a223692.js"><link rel="prefetch" href="../../assets/js/391.733d45f0.js"><link rel="prefetch" href="../../assets/js/392.d76fd3df.js"><link rel="prefetch" href="../../assets/js/393.c885df90.js"><link rel="prefetch" href="../../assets/js/394.c344d389.js"><link rel="prefetch" href="../../assets/js/395.687cbd0a.js"><link rel="prefetch" href="../../assets/js/396.57e0df54.js"><link rel="prefetch" href="../../assets/js/397.1a31ad36.js"><link rel="prefetch" href="../../assets/js/398.59535325.js"><link rel="prefetch" href="../../assets/js/399.0a11557f.js"><link rel="prefetch" href="../../assets/js/40.c0f7e504.js"><link rel="prefetch" href="../../assets/js/400.7b2afabb.js"><link rel="prefetch" href="../../assets/js/401.4b72ea6e.js"><link rel="prefetch" href="../../assets/js/402.b94737bf.js"><link rel="prefetch" href="../../assets/js/403.a838c189.js"><link rel="prefetch" href="../../assets/js/404.9a221abc.js"><link rel="prefetch" href="../../assets/js/405.f8f3b954.js"><link rel="prefetch" href="../../assets/js/406.2de8752c.js"><link rel="prefetch" href="../../assets/js/407.eb35a188.js"><link rel="prefetch" href="../../assets/js/408.47acaedf.js"><link rel="prefetch" href="../../assets/js/409.aa2afaca.js"><link rel="prefetch" href="../../assets/js/41.e7e858c4.js"><link rel="prefetch" href="../../assets/js/410.722e5009.js"><link rel="prefetch" href="../../assets/js/411.2dbe321f.js"><link rel="prefetch" href="../../assets/js/412.39ed2d1e.js"><link rel="prefetch" href="../../assets/js/413.a088f973.js"><link rel="prefetch" href="../../assets/js/414.87f8d239.js"><link rel="prefetch" href="../../assets/js/415.f90a1394.js"><link rel="prefetch" href="../../assets/js/416.ea4ba38d.js"><link rel="prefetch" href="../../assets/js/417.8a1c9676.js"><link rel="prefetch" href="../../assets/js/418.79315748.js"><link rel="prefetch" href="../../assets/js/419.1e3ddf12.js"><link rel="prefetch" href="../../assets/js/42.8202bb44.js"><link rel="prefetch" href="../../assets/js/420.b6d9e0cb.js"><link rel="prefetch" href="../../assets/js/421.0c74ef64.js"><link rel="prefetch" href="../../assets/js/422.94c20620.js"><link rel="prefetch" href="../../assets/js/423.fa0d6946.js"><link rel="prefetch" href="../../assets/js/424.9036ac4f.js"><link rel="prefetch" href="../../assets/js/425.8d8e82da.js"><link rel="prefetch" href="../../assets/js/426.03b7da89.js"><link rel="prefetch" href="../../assets/js/427.e3c8c690.js"><link rel="prefetch" href="../../assets/js/428.96fdfdce.js"><link rel="prefetch" href="../../assets/js/429.a8863be5.js"><link rel="prefetch" href="../../assets/js/43.55e30ded.js"><link rel="prefetch" href="../../assets/js/430.305aa090.js"><link rel="prefetch" href="../../assets/js/431.e02d3725.js"><link rel="prefetch" href="../../assets/js/432.83fa148f.js"><link rel="prefetch" href="../../assets/js/433.1f01715d.js"><link rel="prefetch" href="../../assets/js/434.f3354ec6.js"><link rel="prefetch" href="../../assets/js/435.245644ed.js"><link rel="prefetch" href="../../assets/js/436.3c933a14.js"><link rel="prefetch" href="../../assets/js/437.b62325fb.js"><link rel="prefetch" href="../../assets/js/438.8e122783.js"><link rel="prefetch" href="../../assets/js/439.e95fa7e6.js"><link rel="prefetch" href="../../assets/js/44.e5c90e7a.js"><link rel="prefetch" href="../../assets/js/440.5c168090.js"><link rel="prefetch" href="../../assets/js/441.f8835ac7.js"><link rel="prefetch" href="../../assets/js/442.cf1de5dc.js"><link rel="prefetch" href="../../assets/js/443.50ec8b3c.js"><link rel="prefetch" href="../../assets/js/444.1600e74f.js"><link rel="prefetch" href="../../assets/js/445.795f336d.js"><link rel="prefetch" href="../../assets/js/446.1fb71b0f.js"><link rel="prefetch" href="../../assets/js/447.0136df19.js"><link rel="prefetch" href="../../assets/js/448.abf11aa4.js"><link rel="prefetch" href="../../assets/js/449.4f99bee8.js"><link rel="prefetch" href="../../assets/js/45.89368cde.js"><link rel="prefetch" href="../../assets/js/450.55da381a.js"><link rel="prefetch" href="../../assets/js/451.97a68e8d.js"><link rel="prefetch" href="../../assets/js/452.9dd8c55e.js"><link rel="prefetch" href="../../assets/js/453.3167da0d.js"><link rel="prefetch" href="../../assets/js/454.18fad993.js"><link rel="prefetch" href="../../assets/js/455.24cbebda.js"><link rel="prefetch" href="../../assets/js/456.a2f19b40.js"><link rel="prefetch" href="../../assets/js/457.27f4fb5a.js"><link rel="prefetch" href="../../assets/js/458.29941084.js"><link rel="prefetch" href="../../assets/js/459.b0cc6f89.js"><link rel="prefetch" href="../../assets/js/46.1f553681.js"><link rel="prefetch" href="../../assets/js/460.86ef4965.js"><link rel="prefetch" href="../../assets/js/461.c0b0f695.js"><link rel="prefetch" href="../../assets/js/462.8b86c3a9.js"><link rel="prefetch" href="../../assets/js/463.79aadbb4.js"><link rel="prefetch" href="../../assets/js/464.9735f749.js"><link rel="prefetch" href="../../assets/js/465.4bdede2b.js"><link rel="prefetch" href="../../assets/js/466.ef630311.js"><link rel="prefetch" href="../../assets/js/467.8664e027.js"><link rel="prefetch" href="../../assets/js/468.89b3d4ff.js"><link rel="prefetch" href="../../assets/js/469.74e0af2c.js"><link rel="prefetch" href="../../assets/js/47.5f78034c.js"><link rel="prefetch" href="../../assets/js/470.9643f84e.js"><link rel="prefetch" href="../../assets/js/471.e3a1e16a.js"><link rel="prefetch" href="../../assets/js/472.116791e2.js"><link rel="prefetch" href="../../assets/js/473.3bb6cb3d.js"><link rel="prefetch" href="../../assets/js/474.1a7a0724.js"><link rel="prefetch" href="../../assets/js/475.76c29d71.js"><link rel="prefetch" href="../../assets/js/476.fe1fd93a.js"><link rel="prefetch" href="../../assets/js/477.e3f203de.js"><link rel="prefetch" href="../../assets/js/478.b34f8b1c.js"><link rel="prefetch" href="../../assets/js/479.06d48874.js"><link rel="prefetch" href="../../assets/js/48.0c8a5846.js"><link rel="prefetch" href="../../assets/js/480.ffc77ad4.js"><link rel="prefetch" href="../../assets/js/481.2475d5aa.js"><link rel="prefetch" href="../../assets/js/482.5da370b4.js"><link rel="prefetch" href="../../assets/js/483.2531f6c1.js"><link rel="prefetch" href="../../assets/js/484.3f8b3ccf.js"><link rel="prefetch" href="../../assets/js/485.fb51e0ee.js"><link rel="prefetch" href="../../assets/js/486.881d8443.js"><link rel="prefetch" href="../../assets/js/487.36a959cb.js"><link rel="prefetch" href="../../assets/js/488.086e154c.js"><link rel="prefetch" href="../../assets/js/489.2afd2906.js"><link rel="prefetch" href="../../assets/js/49.40a46041.js"><link rel="prefetch" href="../../assets/js/490.a517239f.js"><link rel="prefetch" href="../../assets/js/491.c1f416dd.js"><link rel="prefetch" href="../../assets/js/492.e36de27b.js"><link rel="prefetch" href="../../assets/js/493.af28d057.js"><link rel="prefetch" href="../../assets/js/494.00509c64.js"><link rel="prefetch" href="../../assets/js/495.8ed86db6.js"><link rel="prefetch" href="../../assets/js/496.412e9f2d.js"><link rel="prefetch" href="../../assets/js/497.ed9f0eeb.js"><link rel="prefetch" href="../../assets/js/498.2112afec.js"><link rel="prefetch" href="../../assets/js/499.743df60a.js"><link rel="prefetch" href="../../assets/js/5.6f1dbbc3.js"><link rel="prefetch" href="../../assets/js/50.54de97a0.js"><link rel="prefetch" href="../../assets/js/500.ab62befa.js"><link rel="prefetch" href="../../assets/js/501.0d54ba9a.js"><link rel="prefetch" href="../../assets/js/502.2f3bf836.js"><link rel="prefetch" href="../../assets/js/503.c3473b0e.js"><link rel="prefetch" href="../../assets/js/504.cb511490.js"><link rel="prefetch" href="../../assets/js/505.a2cc8bdc.js"><link rel="prefetch" href="../../assets/js/506.f8ea663a.js"><link rel="prefetch" href="../../assets/js/507.9cc67e94.js"><link rel="prefetch" href="../../assets/js/508.e08708a1.js"><link rel="prefetch" href="../../assets/js/509.437502c3.js"><link rel="prefetch" href="../../assets/js/51.af5d6a98.js"><link rel="prefetch" href="../../assets/js/510.f5e8a583.js"><link rel="prefetch" href="../../assets/js/511.6fe511a5.js"><link rel="prefetch" href="../../assets/js/512.459d2d68.js"><link rel="prefetch" href="../../assets/js/513.a5f4a768.js"><link rel="prefetch" href="../../assets/js/514.5fd44c68.js"><link rel="prefetch" href="../../assets/js/515.c046ffb4.js"><link rel="prefetch" href="../../assets/js/516.a972f386.js"><link rel="prefetch" href="../../assets/js/517.7c804920.js"><link rel="prefetch" href="../../assets/js/518.ff4a2545.js"><link rel="prefetch" href="../../assets/js/519.b1a8d590.js"><link rel="prefetch" href="../../assets/js/52.b766b60a.js"><link rel="prefetch" href="../../assets/js/520.2d34cada.js"><link rel="prefetch" href="../../assets/js/521.f14247fe.js"><link rel="prefetch" href="../../assets/js/522.38b72172.js"><link rel="prefetch" href="../../assets/js/523.203fa4ac.js"><link rel="prefetch" href="../../assets/js/524.236cda03.js"><link rel="prefetch" href="../../assets/js/525.8caaad18.js"><link rel="prefetch" href="../../assets/js/526.9a217f1e.js"><link rel="prefetch" href="../../assets/js/527.06dc5a4f.js"><link rel="prefetch" href="../../assets/js/528.fa884c79.js"><link rel="prefetch" href="../../assets/js/529.d39c75ca.js"><link rel="prefetch" href="../../assets/js/53.eae65ff7.js"><link rel="prefetch" href="../../assets/js/530.65b18758.js"><link rel="prefetch" href="../../assets/js/531.85af388d.js"><link rel="prefetch" href="../../assets/js/532.9d3f253a.js"><link rel="prefetch" href="../../assets/js/533.77c2fa0b.js"><link rel="prefetch" href="../../assets/js/534.924b0eb2.js"><link rel="prefetch" href="../../assets/js/535.5854a4b0.js"><link rel="prefetch" href="../../assets/js/536.8b57b538.js"><link rel="prefetch" href="../../assets/js/537.ccb7ba0f.js"><link rel="prefetch" href="../../assets/js/538.b9c6c631.js"><link rel="prefetch" href="../../assets/js/539.63164d8a.js"><link rel="prefetch" href="../../assets/js/54.9b89b352.js"><link rel="prefetch" href="../../assets/js/540.7e721167.js"><link rel="prefetch" href="../../assets/js/541.0cd3f048.js"><link rel="prefetch" href="../../assets/js/542.6c5df759.js"><link rel="prefetch" href="../../assets/js/543.e1eebdf2.js"><link rel="prefetch" href="../../assets/js/544.a3042061.js"><link rel="prefetch" href="../../assets/js/545.1a468f89.js"><link rel="prefetch" href="../../assets/js/546.892c1841.js"><link rel="prefetch" href="../../assets/js/547.c6b5ef7e.js"><link rel="prefetch" href="../../assets/js/548.19d884b6.js"><link rel="prefetch" href="../../assets/js/549.7c34a773.js"><link rel="prefetch" href="../../assets/js/55.b8a1964e.js"><link rel="prefetch" href="../../assets/js/550.25f7d121.js"><link rel="prefetch" href="../../assets/js/551.b9f92580.js"><link rel="prefetch" href="../../assets/js/552.bf452147.js"><link rel="prefetch" href="../../assets/js/553.4815ac56.js"><link rel="prefetch" href="../../assets/js/554.c253ebb4.js"><link rel="prefetch" href="../../assets/js/555.4dbef2bf.js"><link rel="prefetch" href="../../assets/js/556.69f1a9f4.js"><link rel="prefetch" href="../../assets/js/557.679e8f40.js"><link rel="prefetch" href="../../assets/js/558.9515c7f8.js"><link rel="prefetch" href="../../assets/js/559.eb17cff7.js"><link rel="prefetch" href="../../assets/js/56.88fa6666.js"><link rel="prefetch" href="../../assets/js/560.0de96a04.js"><link rel="prefetch" href="../../assets/js/561.cdf49465.js"><link rel="prefetch" href="../../assets/js/562.2e895986.js"><link rel="prefetch" href="../../assets/js/563.40a31d36.js"><link rel="prefetch" href="../../assets/js/564.08f15bf2.js"><link rel="prefetch" href="../../assets/js/565.e7625c6a.js"><link rel="prefetch" href="../../assets/js/566.71ee556d.js"><link rel="prefetch" href="../../assets/js/567.7b3e4bc8.js"><link rel="prefetch" href="../../assets/js/568.1a3c07dc.js"><link rel="prefetch" href="../../assets/js/569.4c496338.js"><link rel="prefetch" href="../../assets/js/57.519e80e3.js"><link rel="prefetch" href="../../assets/js/570.d152813e.js"><link rel="prefetch" href="../../assets/js/571.e46946bd.js"><link rel="prefetch" href="../../assets/js/572.ae215a0d.js"><link rel="prefetch" href="../../assets/js/573.da7b2e6c.js"><link rel="prefetch" href="../../assets/js/574.f068c09e.js"><link rel="prefetch" href="../../assets/js/575.f2a128db.js"><link rel="prefetch" href="../../assets/js/576.caf5cd68.js"><link rel="prefetch" href="../../assets/js/577.b6c04041.js"><link rel="prefetch" href="../../assets/js/578.a7707d73.js"><link rel="prefetch" href="../../assets/js/579.ed17d056.js"><link rel="prefetch" href="../../assets/js/58.963c2309.js"><link rel="prefetch" href="../../assets/js/580.88a2ce36.js"><link rel="prefetch" href="../../assets/js/581.f99a65fa.js"><link rel="prefetch" href="../../assets/js/582.220ce66c.js"><link rel="prefetch" href="../../assets/js/583.5d42e8cc.js"><link rel="prefetch" href="../../assets/js/584.0737b3ce.js"><link rel="prefetch" href="../../assets/js/585.516b187d.js"><link rel="prefetch" href="../../assets/js/586.420c42c4.js"><link rel="prefetch" href="../../assets/js/587.e3deb3dd.js"><link rel="prefetch" href="../../assets/js/588.c9bfc1e3.js"><link rel="prefetch" href="../../assets/js/589.ee0f90f3.js"><link rel="prefetch" href="../../assets/js/59.d9b10f83.js"><link rel="prefetch" href="../../assets/js/590.ea859bba.js"><link rel="prefetch" href="../../assets/js/591.4b9781fd.js"><link rel="prefetch" href="../../assets/js/592.c9da8cab.js"><link rel="prefetch" href="../../assets/js/6.064acd80.js"><link rel="prefetch" href="../../assets/js/60.7e89993c.js"><link rel="prefetch" href="../../assets/js/61.f2039f26.js"><link rel="prefetch" href="../../assets/js/62.474d18a7.js"><link rel="prefetch" href="../../assets/js/63.3a64d334.js"><link rel="prefetch" href="../../assets/js/64.4a3787c2.js"><link rel="prefetch" href="../../assets/js/65.120ee13f.js"><link rel="prefetch" href="../../assets/js/66.e7ff207d.js"><link rel="prefetch" href="../../assets/js/67.55a68541.js"><link rel="prefetch" href="../../assets/js/68.33f8c7cd.js"><link rel="prefetch" href="../../assets/js/69.69d65c56.js"><link rel="prefetch" href="../../assets/js/7.ce2273f5.js"><link rel="prefetch" href="../../assets/js/70.93a544a5.js"><link rel="prefetch" href="../../assets/js/71.6eb8d306.js"><link rel="prefetch" href="../../assets/js/72.8cbae6a9.js"><link rel="prefetch" href="../../assets/js/73.c737f071.js"><link rel="prefetch" href="../../assets/js/74.d0ea9fc8.js"><link rel="prefetch" href="../../assets/js/75.2219607f.js"><link rel="prefetch" href="../../assets/js/76.278079e2.js"><link rel="prefetch" href="../../assets/js/77.88eadfbc.js"><link rel="prefetch" href="../../assets/js/78.257c919e.js"><link rel="prefetch" href="../../assets/js/79.e6f5d078.js"><link rel="prefetch" href="../../assets/js/8.e2571ee7.js"><link rel="prefetch" href="../../assets/js/80.40ba7856.js"><link rel="prefetch" href="../../assets/js/81.1fab2c8f.js"><link rel="prefetch" href="../../assets/js/82.6eaad50e.js"><link rel="prefetch" href="../../assets/js/83.9f3e6e81.js"><link rel="prefetch" href="../../assets/js/84.060f32c2.js"><link rel="prefetch" href="../../assets/js/85.c069396c.js"><link rel="prefetch" href="../../assets/js/86.ced213eb.js"><link rel="prefetch" href="../../assets/js/87.763c4879.js"><link rel="prefetch" href="../../assets/js/88.69fe1a6a.js"><link rel="prefetch" href="../../assets/js/89.b87612a8.js"><link rel="prefetch" href="../../assets/js/9.5f2fc60c.js"><link rel="prefetch" href="../../assets/js/90.6132ccb6.js"><link rel="prefetch" href="../../assets/js/91.27dbc3bd.js"><link rel="prefetch" href="../../assets/js/92.88832461.js"><link rel="prefetch" href="../../assets/js/93.0166bd69.js"><link rel="prefetch" href="../../assets/js/94.e29b12f1.js"><link rel="prefetch" href="../../assets/js/95.f1245827.js"><link rel="prefetch" href="../../assets/js/96.9c45438e.js"><link rel="prefetch" href="../../assets/js/97.e8783a06.js"><link rel="prefetch" href="../../assets/js/98.60628afa.js"><link rel="prefetch" href="../../assets/js/99.b3cb9d0f.js">
    <link rel="stylesheet" href="../../assets/css/0.styles.f7de6701.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="../../index.html" class="home-link router-link-active"><!----> <span class="site-name">代码重工</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <!----></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><!---->  <!----> </aside> <main class="page"> <div class="theme-default-content content__default"><p></p><div class="table-of-contents"><ul><li><a href="#_1、基本语法">1、基本语法</a><ul><li><a href="#_1嵌入方式">①嵌入方式</a></li><li><a href="#_2变量">②变量</a></li><li><a href="#_3函数">③函数</a></li><li><a href="#_4this关键字">④this关键字</a></li><li><a href="#_5数组对象的常用方法">⑤数组对象的常用方法</a></li><li><a href="#_6json格式">⑥JSON格式</a></li></ul></li><li><a href="#_2、dom">2、DOM</a></li><li><a href="#_3、事件驱动">3、事件驱动</a><ul><li><a href="#_1三个基本要素">①三个基本要素</a></li><li><a href="#_2三要素之间的关系">②三要素之间的关系</a></li><li><a href="#_3取消控件的默认行为">③取消控件的默认行为</a></li><li><a href="#_4阻止事件冒泡">④阻止事件冒泡</a></li></ul></li><li><a href="#_4、正则表达式">4、正则表达式</a><ul><li><a href="#_1概念">①概念</a></li><li><a href="#_2组成">②组成</a></li><li><a href="#_3在javascript中创建正则表达式对象">③在JavaScript中创建正则表达式对象</a></li><li><a href="#_4元字符">④元字符</a></li><li><a href="#_4字符集合">④字符集合</a></li><li><a href="#_5重复出现">⑤重复出现</a></li><li><a href="#_6常用典型例子">⑥常用典型例子</a></li><li><a href="#_7掌握要求">⑦掌握要求</a></li></ul></li></ul></div><p></p> <h1 id="javascript笔记"><a href="#javascript笔记" class="header-anchor">#</a> JavaScript笔记</h1> <h2 id="_1、基本语法"><a href="#_1、基本语法" class="header-anchor">#</a> 1、基本语法</h2> <h3 id="_1嵌入方式"><a href="#_1嵌入方式" class="header-anchor">#</a> ①嵌入方式</h3> <h4 id="_1-具体方式"><a href="#_1-具体方式" class="header-anchor">#</a> [1]具体方式</h4> <ul><li>使用script标签：HTML文档内部</li> <li>使用script标签的src属性：引用外部JavaScript文件</li></ul> <h4 id="_2-引用外部javascript文件"><a href="#_2-引用外部javascript文件" class="header-anchor">#</a> [2]引用外部JavaScript文件</h4> <ul><li>引用外部JavaScript文件的script标签里面不能写JavaScript代码</li> <li>引用外部JavaScript文件的script标签不能改成单标签</li> <li>外部JavaScript文件一定要先引入再使用</li></ul> <h3 id="_2变量"><a href="#_2变量" class="header-anchor">#</a> ②变量</h3> <h4 id="_1-数据类型"><a href="#_1-数据类型" class="header-anchor">#</a> [1]数据类型</h4> <ul><li>基本数据类型
<ul><li>数值型</li> <li>字符串类型：单引号和双引号作用一样</li> <li>布尔类型</li></ul></li> <li>引用数据类型</li></ul> <table><thead><tr><th></th> <th>new关键字创建</th> <th>使用符号</th></tr></thead> <tbody><tr><td>对象</td> <td>new Xxx()</td> <td>{}</td></tr> <tr><td>数组</td> <td>new Array()</td> <td>[]</td></tr></tbody></table> <h4 id="_2-声明变量"><a href="#_2-声明变量" class="header-anchor">#</a> [2]声明变量</h4> <ul><li>关键字：var</li> <li>数据类型：可以接收任何类型的数据</li> <li>标识符：严格区分大小写</li></ul> <h4 id="_3-使用变量"><a href="#_3-使用变量" class="header-anchor">#</a> [3]使用变量</h4> <ul><li><p>变量在使用过程中仍然可以接受任何数据类型</p></li> <li><p>如果使用一个没有声明的变量，会报错</p> <p>Uncaught ReferenceError: b is not defined</p></li> <li><p>如果声明一个变量没有初始化，那么这个变量的值就是undefined</p></li></ul> <h3 id="_3函数"><a href="#_3函数" class="header-anchor">#</a> ③函数</h3> <h4 id="_1-系统内置函数"><a href="#_1-系统内置函数" class="header-anchor">#</a> [1]系统内置函数</h4> <ul><li>alert()弹出警告框</li> <li>confirm()弹出确认框架</li> <li>console.log()在浏览器控制台打印日志信息</li></ul> <h4 id="_2-声明函数"><a href="#_2-声明函数" class="header-anchor">#</a> [2]声明函数</h4> <p>方式一：</p> <div class="language-javascript line-numbers-mode"><pre class="language-javascript"><code>        <span class="token keyword">function</span> <span class="token function">sum</span><span class="token punctuation">(</span><span class="token parameter">a<span class="token punctuation">,</span> b</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">return</span> a<span class="token operator">+</span>b<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><p>方式二：声明匿名函数，将函数对象的引用赋值给一个变量</p> <div class="language-javascript line-numbers-mode"><pre class="language-javascript"><code>        <span class="token keyword">var</span> <span class="token function-variable function">total</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">return</span> a<span class="token operator">+</span>b<span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h4 id="_3-调用函数"><a href="#_3-调用函数" class="header-anchor">#</a> [3]调用函数</h4> <p>基本语法公式：<span style="color:blue;font-weight:bold;">函数引用()</span></p> <div class="language-javascript line-numbers-mode"><pre class="language-javascript"><code>        <span class="token keyword">function</span> <span class="token function">sum</span><span class="token punctuation">(</span><span class="token parameter">a<span class="token punctuation">,</span> b</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">return</span> a<span class="token operator">+</span>b<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token keyword">var</span> result <span class="token operator">=</span> <span class="token function">sum</span><span class="token punctuation">(</span><span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">&quot;result=&quot;</span><span class="token operator">+</span>result<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><p>或</p> <div class="language-javascript line-numbers-mode"><pre class="language-javascript"><code>        <span class="token keyword">var</span> <span class="token function-variable function">total</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">return</span> a<span class="token operator">+</span>b<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token keyword">var</span> totalResult <span class="token operator">=</span> <span class="token function">total</span><span class="token punctuation">(</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">&quot;totalResult=&quot;</span><span class="token operator">+</span>totalResult<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h4 id="_4-函数对象和函数引用的关系"><a href="#_4-函数对象和函数引用的关系" class="header-anchor">#</a> [4]函数对象和函数引用的关系</h4> <p><img src="https://heavy_code_industry.gitee.io/code_heavy_industry/assets/img/img020.c431d1e1.png" alt="./images"></p> <p>在JavaScript中使用函数时，请大家务必注意：</p> <ul><li>单独写函数名表示函数的引用</li> <li>函数名()表示调用函数</li></ul> <p>引用函数和调用函数是完全不一样的效果。以HelloWorld程序为例：</p> <div class="language-javascript line-numbers-mode"><pre class="language-javascript"><code><span class="token comment">// 1.通过document对象在整个文档范围内查找按钮对象</span>
<span class="token comment">// 使用var关键字接收document.getElementById(&quot;helloBtn&quot;)方法的返回值</span>
<span class="token keyword">var</span> helloBtn <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">&quot;helloBtn&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 2.声明一个函数，这个函数就是用户点击按钮后要调用执行的函数</span>
<span class="token keyword">function</span> <span class="token function">whenYouClickBtn</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
	
	<span class="token comment">// 当用户点击按钮后，调用JavaScript系统内置的函数，弹出警告框</span>
	<span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;Hello&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
	
<span class="token punctuation">}</span>

<span class="token comment">// 3.将2声明的函数绑定到按钮的单击事件上</span>
<span class="token comment">// ①在JavaScript中，函数也是对象</span>
<span class="token comment">// ②函数名是这个对象的引用</span>
<span class="token comment">// ③将函数名赋值给按钮对象的事件属性就完成的事件响应函数的绑定</span>
<span class="token comment">// ④最终效果：用户触发事件（真的点击了按钮），系统会来调用我们绑定的这个函数</span>
helloBtn<span class="token punctuation">.</span>onclick <span class="token operator">=</span> whenYouClickBtn<span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br></div></div><p>在最后一行代码中，函数名后面写()和不写()效果完全不同：</p> <ul><li>不写括号：将whenYouClickBtn函数的引入赋值给onclick属性</li> <li>写括号：将whenYouClickBtn函数的返回值赋值给onclick属性</li></ul> <h3 id="_4this关键字"><a href="#_4this关键字" class="header-anchor">#</a> ④this关键字</h3> <ul><li>在script标签中直接使用：this代表window对象</li> <li>在函数中使用：this代表那个调用函数的对象</li></ul> <h3 id="_5数组对象的常用方法"><a href="#_5数组对象的常用方法" class="header-anchor">#</a> ⑤数组对象的常用方法</h3> <table><thead><tr><th>方法名</th> <th>功能</th></tr></thead> <tbody><tr><td>push()</td> <td>将数据压入数组</td></tr> <tr><td>pop()</td> <td>将数据从数组中弹出</td></tr> <tr><td>reverse()</td> <td>将数组中的数据反序</td></tr> <tr><td>join()</td> <td>将数组中的数据根据指定的符号拼接成字符串</td></tr></tbody></table> <p>和数组的join()配对的字符串的方法：</p> <table><thead><tr><th>方法名</th> <th>功能</th></tr></thead> <tbody><tr><td>split()</td> <td>将字符串根据指定的符号拆分成数组</td></tr></tbody></table> <h3 id="_6json格式"><a href="#_6json格式" class="header-anchor">#</a> ⑥JSON格式</h3> <h4 id="_1-用途"><a href="#_1-用途" class="header-anchor">#</a> [1]用途</h4> <p>JSON这种数据格式的用途是<span style="color:blue;font-weight:bold;">『跨平台数据传输』</span>。</p> <h4 id="_2-语法规范"><a href="#_2-语法规范" class="header-anchor">#</a> [2]语法规范</h4> <ul><li>两端允许的符号
<ul><li>{}：定义一个JSON对象</li> <li>[]：定义一个JOSN数组</li></ul></li> <li>JSON对象的格式
<ul><li>{key<span style="color:blue;font-weight:bold;font-size:30px;">:</span>value<span style="color:blue;font-weight:bold;font-size:30px;">,</span>...<span style="color:blue;font-weight:bold;font-size:30px;">,</span>key<span style="color:blue;font-weight:bold;font-size:30px;">:</span>value}</li> <li>[value<span style="color:blue;font-weight:bold;font-size:30px;">,</span>...<span style="color:blue;font-weight:bold;font-size:30px;">,</span>value]</li></ul></li> <li>key的类型：字符串类型</li> <li>value的类型：
<ul><li>基本数据类型</li> <li>引用数据类型
<ul><li>JSON对象</li> <li>JSON数组</li></ul></li></ul></li></ul> <p>正因为JSON的value可以还是JSON数据，所以JSON这种格式可以<span style="color:blue;font-weight:bold;">『多层嵌套』</span>，从而用来描述非常复杂的数据类型。</p> <h4 id="_3-json对象和json字符串互转"><a href="#_3-json对象和json字符串互转" class="header-anchor">#</a> [3]JSON对象和JSON字符串互转</h4> <table><thead><tr><th>方法名</th> <th>功能</th></tr></thead> <tbody><tr><td>JSON.stringify()</td> <td>将JSON对象转换成JSON字符串</td></tr> <tr><td>JSON.parse()</td> <td>将JSON字符串解析为JSON对象</td></tr></tbody></table> <h2 id="_2、dom"><a href="#_2、dom" class="header-anchor">#</a> 2、DOM</h2> <ul><li>DOM：Document Object Model文档对象模型</li> <li>数据结构：整个HTML文档中标签、文本、属性、注释等等节点对象组成的一个树形结构。</li></ul> <table><thead><tr><th>组成部分</th> <th>节点类型</th> <th>具体类型</th></tr></thead> <tbody><tr><td>整个文档</td> <td>文档节点</td> <td>Document</td></tr> <tr><td>HTML标签</td> <td>元素节点</td> <td>Element</td></tr> <tr><td>HTML标签内的文本</td> <td>文本节点</td> <td>Text</td></tr> <tr><td>HTML标签内的属性</td> <td>属性节点</td> <td>Attr</td></tr> <tr><td>注释</td> <td>注释节点</td> <td>Comment</td></tr></tbody></table> <ul><li><p>节点之间的关系</p> <ul><li><p>父子关系</p> <p><img src="https://heavy_code_industry.gitee.io/code_heavy_industry/assets/img/img006.46dad6e0.png" alt="./images"></p></li> <li><p>先辈后代关系</p> <p><img src="https://heavy_code_industry.gitee.io/code_heavy_industry/assets/img/img007.1c9bf6a0.png" alt="./images"></p></li></ul></li></ul> <h2 id="_3、事件驱动"><a href="#_3、事件驱动" class="header-anchor">#</a> 3、事件驱动</h2> <h3 id="_1三个基本要素"><a href="#_1三个基本要素" class="header-anchor">#</a> ①三个基本要素</h3> <ul><li>控件：用户在页面上操作的那个东西</li> <li>事件：用户具体所做的操作</li> <li>函数：在检测到用户操作了控件后，我们希望执行的代码</li></ul> <h3 id="_2三要素之间的关系"><a href="#_2三要素之间的关系" class="header-anchor">#</a> ②三要素之间的关系</h3> <table><thead><tr><th>地雷</th> <th>事件响应函数</th></tr></thead> <tbody><tr><td>兵工厂生产地雷</td> <td>声明函数</td></tr> <tr><td>找到埋设位置</td> <td>找到绑定事件响应函数的DOM元素</td></tr> <tr><td>埋</td> <td>绑</td></tr> <tr><td>等</td> <td>等</td></tr> <tr><td>有人踩到</td> <td>有人点击</td></tr> <tr><td>地雷爆炸</td> <td>函数执行</td></tr></tbody></table> <h3 id="_3取消控件的默认行为"><a href="#_3取消控件的默认行为" class="header-anchor">#</a> ③取消控件的默认行为</h3> <h4 id="_1-控件的默认行为"><a href="#_1-控件的默认行为" class="header-anchor">#</a> [1]控件的默认行为</h4> <ul><li>超链接：点击后会跳转页面</li> <li>表单的提交按钮：点击后会提交表单</li></ul> <h4 id="_2-event事件对象"><a href="#_2-event事件对象" class="header-anchor">#</a> [2]event事件对象</h4> <p>在JavaScript的function中，有很多内置的对象可以直接使用。其中event就是一个可以直接使用的内置对象，这个对象中封装了当前事件相关的所有信息。</p> <h4 id="_3-调用event对象取消控件的默认行为"><a href="#_3-调用event对象取消控件的默认行为" class="header-anchor">#</a> [3]调用event对象取消控件的默认行为</h4> <div class="language-javascript line-numbers-mode"><pre class="language-javascript"><code>event<span class="token punctuation">.</span><span class="token function">preventDefault</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_4阻止事件冒泡"><a href="#_4阻止事件冒泡" class="header-anchor">#</a> ④阻止事件冒泡</h3> <h4 id="_1-冒泡"><a href="#_1-冒泡" class="header-anchor">#</a> [1]冒泡</h4> <p><img src="" alt="./images"></p> <p>在页面上，某一个HTML元素触发事件后，这个事件会沿着DOM结构，向这个元素的父元素传递。如果有需要，父元素可以通过绑定事件响应函数的方式继续处理这个事件。如果没有被阻止，最终这个事件会被传递到window对象。</p> <h4 id="_2-阻止"><a href="#_2-阻止" class="header-anchor">#</a> [2]阻止</h4> <p>在子元素的事件响应函数中，调用event事件对象的stopPropagation()方法就可以阻止事件向父元素传递。</p> <h2 id="_4、正则表达式"><a href="#_4、正则表达式" class="header-anchor">#</a> 4、正则表达式</h2> <h3 id="_1概念"><a href="#_1概念" class="header-anchor">#</a> ①概念</h3> <p>本质：用字符串声明的规则</p> <p>功能：</p> <ul><li>模式验证：使用规则对目标文本进行检测，判断目标文本是否满足规则。</li> <li>匹配查找：使用规则在目标文件中进行搜索，把满足规则的返回。</li> <li>匹配替换：使用规则在目标文件中进行搜索，把满足规则的替换为指定的新字符串。</li></ul> <h3 id="_2组成"><a href="#_2组成" class="header-anchor">#</a> ②组成</h3> <ul><li>普通字符：就代表字符本身。</li> <li>元字符：在正则表达式中被赋予了特殊含义。例如：^在[]外面表示限制字符串开头的规则，在[]里面表示取反。</li></ul> <h3 id="_3在javascript中创建正则表达式对象"><a href="#_3在javascript中创建正则表达式对象" class="header-anchor">#</a> ③在JavaScript中创建正则表达式对象</h3> <ul><li>new RegExp()</li> <li>/正则表达式/匹配模式
<ul><li>匹配模式：g表示全文查找</li> <li>匹配模式：i表示忽略大小写</li> <li>匹配模式：m表示多行匹配</li></ul></li></ul> <h3 id="_4元字符"><a href="#_4元字符" class="header-anchor">#</a> ④元字符</h3> <table><thead><tr><th>代码</th> <th>说明</th></tr></thead> <tbody><tr><td>.</td> <td>匹配除换行字符以外的任意字符。</td></tr> <tr><td>\w</td> <td>匹配字母或数字或下划线等价于[a-zA-Z0-9_]</td></tr> <tr><td>\W</td> <td>匹配任何非单词字符。等价于[^A-Za-z0-9_]</td></tr> <tr><td>\s</td> <td>匹配任意的空白符，包括空格、制表符、换页符等等。等价于[\f\n\r\t\v]。</td></tr> <tr><td>\S</td> <td>匹配任何非空白字符。等价于[^\f\n\r\t\v]。</td></tr> <tr><td>\d</td> <td>匹配数字。等价于[0-9]。</td></tr> <tr><td>\D</td> <td>匹配一个非数字字符。等价于[^0-9]</td></tr> <tr><td>\b</td> <td>匹配单词的开始或结束</td></tr> <tr><td>^</td> <td>匹配字符串的开始，但在[]中使用表示取反</td></tr> <tr><td>$</td> <td>匹配字符串的结束</td></tr> <tr><td>|</td> <td>逻辑上的『或者』</td></tr></tbody></table> <h3 id="_4字符集合"><a href="#_4字符集合" class="header-anchor">#</a> ④字符集合</h3> <table><thead><tr><th>语法格式</th> <th>示例</th> <th>说明</th></tr></thead> <tbody><tr><td>[字符列表]</td> <td>正则表达式：[abc]<br>含义：目标字符串包含abc中的任何一个字符<br>目标字符串：plain<br>是否匹配：是<br>原因：plain中的“a”在列表“abc”中</td> <td>目标字符串中任何一个字符出现在字符列表中就算匹配。</td></tr> <tr><td>[^字符列表]</td> <td>[^abc]<br>含义：目标字符串包含abc以外的任何一个字符<br>目标字符串：plain<br>是否匹配：是<br>原因：plain中包含“p”、“l”、“i”、“n”</td> <td>匹配字符列表中未包含的任意字符。</td></tr> <tr><td>[字符范围]</td> <td>正则表达式：[a-z]<br>含义：所有小写英文字符组成的字符列表<br>正则表达式：[A-Z]<br>含义：所有大写英文字符组成的字符列表</td> <td>匹配指定范围内的任意字符。</td></tr></tbody></table> <h3 id="_5重复出现"><a href="#_5重复出现" class="header-anchor">#</a> ⑤重复出现</h3> <table><thead><tr><th>代码</th> <th>说明</th></tr></thead> <tbody><tr><td>*</td> <td>重复零次或多次</td></tr> <tr><td>+</td> <td>重复一次或多次</td></tr> <tr><td>?</td> <td>重复零次或一次</td></tr> <tr><td>{n}</td> <td>重复n次</td></tr> <tr><td>{n,}</td> <td>重复n次或多次</td></tr> <tr><td>{n,m}</td> <td>重复n到m次</td></tr></tbody></table> <h3 id="_6常用典型例子"><a href="#_6常用典型例子" class="header-anchor">#</a> ⑥常用典型例子</h3> <table><thead><tr><th>需求</th> <th>正则表达式</th></tr></thead> <tbody><tr><td>用户名</td> <td>/^[a-zA-Z_][a-zA-Z_\-0-9]{5,9}$/</td></tr> <tr><td>密码</td> <td>/^[a-zA-Z0-9_\-@\#\&amp;\*]{6,12}$/</td></tr> <tr><td>前后空格</td> <td>/^\s+|\s+$/g</td></tr> <tr><td>电子邮箱</td> <td>/^[a-zA-Z0-9_\.-]+@([a-zA-Z0-9-]+[\.]{1})+[a-zA-Z]+$/</td></tr></tbody></table> <h3 id="_7掌握要求"><a href="#_7掌握要求" class="header-anchor">#</a> ⑦掌握要求</h3> <p>拿到一个现成的正则表达式，会改成我们需要的即可。</p> <p><a href="index.html">回到上一级目录</a></p></div> <footer class="page-edit"><!----> <!----></footer> <!----> </main></div><div class="global-ui"></div></div>
    <script src="../../assets/js/app.972bd0f0.js" defer></script><script src="../../assets/js/4.904e76b5.js" defer></script><script src="../../assets/js/123.781e7192.js" defer></script>
  </body>

<!-- Mirrored from heavy_code_industry.gitee.io/code_heavy_industry/pro001-javaweb/note/note002-JavaScript.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 10 May 2022 05:03:18 GMT -->
</html>
